refactor(eval): address on-demand review feedback - #2007
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2007 +/- ##
============================================
+ Coverage 97.09% 97.13% +0.04%
============================================
Files 381 381
Lines 22778 22786 +8
============================================
+ Hits 22116 22134 +18
+ Misses 662 652 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Hweinstock
left a comment
There was a problem hiding this comment.
thanks for coming back to this! one question on the testing pattern, otherwise lgtm.
| return { core, stdout: io.stdout(), stderr: io.stderr() }; | ||
| } | ||
|
|
||
| async function runWithRealCore(options: LogsOptions, logger = createSilentLogger()) { |
There was a problem hiding this comment.
should this use the fixture pattern? Might be a little harder to trigger these cases, but seems possible unless i'm missing something.
There was a problem hiding this comment.
Kept it on inline stubs on purpose. The fixture harness records against a live account; these cases can't be provoked there:
- Query resolving
Failed/Cancelled/Timeout - Runtime log group missing while
aws/spansexists - Malformed telemetry rows — this test also asserts logger warnings, which the fixture
run()helper (silent logger, stdout only) can't capture
Same .send() seam, same real CoreClient, so it's the deterministic counterpart for the negative paths, not a weaker test. Added a comment saying so in ab60ff5.
|
is this from this PR? |
Yes — dropped semicolon in |
- Restore dropped semicolon in src/core/types.tsx that failed format:check - Explain why runWithRealCore stubs the SDK .send() seam inline instead of using the golden fixture harness (failure conditions the recorder can't provoke against a live account)
ab60ff5 to
8ffdcb9
Compare
Follow-up to #1983: makes on-demand evaluation failures easier to classify and removes review-identified noise.
Changes
ResourceNotFoundError.CloudWatchQueryErrorwith query status and ID metadata.test.each.Decisions
Evaluatecalls. Continuing after one fails could return incomplete results while appearing successful.context.spanContext.sessionIdsupports per-session filtering without changing the SDK response shape.DataSourceConfig, including CloudWatch log groups andonlineEvaluationConfigArn; on-demand feeds client-side Logs Insights.Verification